3.1054 \(\int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x)) \, dx\)

Optimal. Leaf size=26 \[ -\frac{i c (a+i a \tan (e+f x))^m}{f m} \]

[Out]

((-I)*c*(a + I*a*Tan[e + f*x])^m)/(f*m)

________________________________________________________________________________________

Rubi [A]  time = 0.0857937, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.103, Rules used = {3522, 3487, 32} \[ -\frac{i c (a+i a \tan (e+f x))^m}{f m} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])^m*(c - I*c*Tan[e + f*x]),x]

[Out]

((-I)*c*(a + I*a*Tan[e + f*x])^m)/(f*m)

Rule 3522

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Di
st[a^m*c^m, Int[Sec[e + f*x]^(2*m)*(c + d*Tan[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0] && IntegerQ[m] &&  !(IGtQ[n, 0] && (LtQ[m, 0] || GtQ[m, n]))

Rule 3487

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rubi steps

\begin{align*} \int (a+i a \tan (e+f x))^m (c-i c \tan (e+f x)) \, dx &=(a c) \int \sec ^2(e+f x) (a+i a \tan (e+f x))^{-1+m} \, dx\\ &=-\frac{(i c) \operatorname{Subst}\left (\int (a+x)^{-1+m} \, dx,x,i a \tan (e+f x)\right )}{f}\\ &=-\frac{i c (a+i a \tan (e+f x))^m}{f m}\\ \end{align*}

Mathematica [B]  time = 3.6697, size = 95, normalized size = 3.65 \[ -\frac{i c 2^m \left (e^{i f x}\right )^m \left (\frac{e^{i (e+f x)}}{1+e^{2 i (e+f x)}}\right )^m \sec ^{-m}(e+f x) (\cos (f x)+i \sin (f x))^{-m} (a+i a \tan (e+f x))^m}{f m} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])^m*(c - I*c*Tan[e + f*x]),x]

[Out]

((-I)*2^m*c*(E^(I*f*x))^m*(E^(I*(e + f*x))/(1 + E^((2*I)*(e + f*x))))^m*(a + I*a*Tan[e + f*x])^m)/(f*m*Sec[e +
 f*x]^m*(Cos[f*x] + I*Sin[f*x])^m)

________________________________________________________________________________________

Maple [A]  time = 0.012, size = 25, normalized size = 1. \begin{align*}{\frac{-ic \left ( a+ia\tan \left ( fx+e \right ) \right ) ^{m}}{fm}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^m*(c-I*c*tan(f*x+e)),x)

[Out]

-I*c*(a+I*a*tan(f*x+e))^m/f/m

________________________________________________________________________________________

Maxima [A]  time = 1.8179, size = 32, normalized size = 1.23 \begin{align*} -\frac{i \, a^{m} c{\left (i \, \tan \left (f x + e\right ) + 1\right )}^{m}}{f m} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^m*(c-I*c*tan(f*x+e)),x, algorithm="maxima")

[Out]

-I*a^m*c*(I*tan(f*x + e) + 1)^m/(f*m)

________________________________________________________________________________________

Fricas [A]  time = 1.64044, size = 89, normalized size = 3.42 \begin{align*} -\frac{i \, c \left (\frac{2 \, a e^{\left (2 i \, f x + 2 i \, e\right )}}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}\right )^{m}}{f m} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^m*(c-I*c*tan(f*x+e)),x, algorithm="fricas")

[Out]

-I*c*(2*a*e^(2*I*f*x + 2*I*e)/(e^(2*I*f*x + 2*I*e) + 1))^m/(f*m)

________________________________________________________________________________________

Sympy [A]  time = 18.0307, size = 119, normalized size = 4.58 \begin{align*} \begin{cases} x \left (- i c \tan{\left (e \right )} + c\right ) & \text{for}\: f = 0 \wedge m = 0 \\x \left (i a \tan{\left (e \right )} + a\right )^{m} \left (- i c \tan{\left (e \right )} + c\right ) & \text{for}\: f = 0 \\c x - \frac{i c \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} & \text{for}\: m = 0 \\\frac{i c \left (i a \tan{\left (e + f x \right )} + a\right )^{m} \tan{\left (e + f x \right )}}{- f m \tan{\left (e + f x \right )} + i f m} + \frac{c \left (i a \tan{\left (e + f x \right )} + a\right )^{m}}{- f m \tan{\left (e + f x \right )} + i f m} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**m*(c-I*c*tan(f*x+e)),x)

[Out]

Piecewise((x*(-I*c*tan(e) + c), Eq(f, 0) & Eq(m, 0)), (x*(I*a*tan(e) + a)**m*(-I*c*tan(e) + c), Eq(f, 0)), (c*
x - I*c*log(tan(e + f*x)**2 + 1)/(2*f), Eq(m, 0)), (I*c*(I*a*tan(e + f*x) + a)**m*tan(e + f*x)/(-f*m*tan(e + f
*x) + I*f*m) + c*(I*a*tan(e + f*x) + a)**m/(-f*m*tan(e + f*x) + I*f*m), True))

________________________________________________________________________________________

Giac [A]  time = 1.54876, size = 31, normalized size = 1.19 \begin{align*} -\frac{i \,{\left (i \, a \tan \left (f x + e\right ) + a\right )}^{m} c}{f m} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^m*(c-I*c*tan(f*x+e)),x, algorithm="giac")

[Out]

-I*(I*a*tan(f*x + e) + a)^m*c/(f*m)